set(SOURCES ${SOURCES} gbser_posix.cc)
set(HEADERS ${HEADERS} gbser_posix.h)
target_compile_options(gpsbabel PRIVATE -Wall)
+ # disable warning from strptime.c, which we don't want to own or modify
+ set_source_files_properties(strptime.c PROPERTIES COMPILE_OPTIONS -Wno-unused-but-set-variable)
endif()
if(WIN32)
#include <QByteArray> // for QByteArray
#include <QChar> // for operator==, QChar
#include <QCoreApplication> // for QCoreApplication
-#ifdef GENERATE_CORE_STRINGS
-#include <QDebug> // for QDebug, operator<<
-#endif
#include <QObject> // for QObject
#include <QProcess> // for QProcess
#include <QRegularExpression> // for QRegularExpression
#include <QVariant> // for QVariant
#include <QApplication> // for QApplication
#include <QMessageBox> // for QMessageBox
+#ifdef GENERATE_CORE_STRINGS
+#include <QtGlobal> // for QT_VERSION, QT_VERSION_CHECK
+#endif
#include "appname.h" // for appName
static QString xlt(const QString& f)
{
#ifdef GENERATE_CORE_STRINGS
+#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
+ *generate_output_stream << "QT_TRANSLATE_NOOP(\"core\",\"" << f << "\")" << endl;
+#else
*generate_output_stream << "QT_TRANSLATE_NOOP(\"core\",\"" << f << "\")" << Qt::endl;
+#endif
#endif
return QCoreApplication::translate("core", f.toUtf8().constData());
}
const QStringList directories = {
QApplication::applicationDirPath() + "/translations",
":/translations",
+#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
QLibraryInfo::location(QLibraryInfo::TranslationsPath)
+#else
+ QLibraryInfo::path(QLibraryInfo::TranslationsPath)
+#endif
};
// Load the new translator.